#ifndef   M_Code_WORKSPACE_H
#define   M_Code_WORKSPACE_H

#include <wx/string.h>
#include <wx/filename.h>
#include "globals.h"

class M_Code_Workspace {
  public:
    M_Code_Workspace( const wxString& filename = DEFAULT_WORKSPACE );
    virtual ~M_Code_Workspace();
    virtual bool Save( bool force = false );
    virtual bool SaveAs( const wxString& filename );
    virtual wxString GetFilename() const {
      return m_Filename.GetFullPath();
    }
    virtual wxString GetTitle() const { return m_Title; }
    virtual void SetTitle( const wxString& title );
    virtual bool IsOK() const { return m_IsOK; }
    virtual bool IsDefault() const { return m_IsDefault; }
    virtual bool GetModified() const { return m_Modified; }
    virtual void SetModified( bool modified );
    void SetPreferredTarget( const wxString &target );
    wxString GetPreferredTarget() const;
    void ActiveProjectChanged();
    bool SaveLayout();
  private:
    bool m_IsOK;
    bool m_IsDefault;
    bool m_Modified;
    wxFileName m_Filename;
    wxString m_Title;
    wxString m_PreferredTargetName;
    void Load();
    bool LoadLayout();

};

#endif
